package pos.Configuration;

import java.awt.event.KeyEvent;
import pos.ICommand;
import pos.utils.IContainer;

/**
 * 配置模式的键盘事件命令,由事件行为发起，当前容器接收
 * @author plus
 */
public class CommandKeyEvent implements ICommand{
    private IContainer receiver;
    public CommandKeyEvent(IContainer receiver) {
        this.receiver=receiver;
    }
    /**
     * 执行命令，将事件行为捕获的键盘事件发送到当前容器中
     * @param Param 所转发的AWTKeyEvent
     * @return 无需返回，返回null
     */
    public Object execute(Object Param) {
        receiver.processKeyEvent((KeyEvent)Param);
        return null;
    }

}